package com.cskaoyan.demo.controller;

import com.cskaoyan.demo.bean.BaseRespVo;
import com.cskaoyan.demo.bean.ItemsBean;
import com.cskaoyan.demo.bean.User;
import com.cskaoyan.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("list")
    public BaseRespVo list(Integer page, Integer limit, String username, String mobile, String sort, String order) {
        ItemsBean<User> data = userService.queryList(page,limit,username,mobile,sort,order);
        return BaseRespVo.ok(data);
    }
}
